package com.iot08.api.response;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * @author cwj
 * @description
 * @date 2025/1/10 10:47
 **/
@Data
public class VipEnjoyAloneFunction implements Serializable {

    private Integer isLocationEnjoy;

    private Integer isVideoEnjoy;

    private Integer isPhotoEnjoy;

    private Integer isStepEnjoy;

    private Integer isChatEnjoy;

    private Integer isWifiEnjoy;

    private Integer isDrinkWaterEnjoy;

    private Integer isSedentarinessEnjoy;

    private Integer isAppManagerEnjoy;

    private Integer isAgenetSmsEnjoy;

    private Integer isAutoCallEnjoy;

    private Integer isScreensavorEnjoy;

    private Integer isFindEnjoy;

    private Integer isDialSwitchEnjoy;

    private Integer isFlowerEnjoy;

    private Integer isCostFlowEnjoy;

    private Integer isSchoolTimeTableEnjoy;

    private Integer isVoucherCenterEnjoy;

    private Integer isHeartRateEnjoy;

    private Integer isTemperatureEnjoy;

    private Integer isTimingSwitchEnjoy;

    private Integer isPpmfEnjoy;

    private Integer isDicPenCloudTypeEnjoy;

    private Integer isPhoneBookEnjoy;

    private Integer isAlockEnjoy;

    private Integer isClassForbiddenEnjoy;

    private Integer isSosEnjoy;

    private Integer isRestartEnjoy;

    private Integer isClockEnjoy;

    private Integer isCallRecordEnjoy;

    private Integer isWallpaperEnjoy;

    private Integer isRejectStrangeCall;

    private Integer isPowerSaving;

    private Integer isSleepDetection;


    /**
     * @description 初始化方法
     * @author cwj
     * @param []
     * @return void
     * @date @time 2025/1/10 11:36
     **/
    public void init(int initValue){
        this.setIsLocationEnjoy(initValue);
        this.setIsVideoEnjoy(initValue);
        this.setIsPhotoEnjoy(initValue);
        this.setIsStepEnjoy(initValue);
        this.setIsChatEnjoy(initValue);
        this.setIsWifiEnjoy(initValue);
        this.setIsDrinkWaterEnjoy(initValue);
        this.setIsSedentarinessEnjoy(initValue);
        this.setIsAppManagerEnjoy(initValue);
        this.setIsAgenetSmsEnjoy(initValue);
        this.setIsAutoCallEnjoy(initValue);
        this.setIsScreensavorEnjoy(initValue);
        this.setIsFindEnjoy(initValue);
        this.setIsDialSwitchEnjoy(initValue);
        this.setIsFlowerEnjoy(initValue);
        this.setIsCostFlowEnjoy(initValue);
        this.setIsSchoolTimeTableEnjoy(initValue);
        this.setIsVoucherCenterEnjoy(initValue);
        this.setIsHeartRateEnjoy(initValue);
        this.setIsTemperatureEnjoy(initValue);
        this.setIsTimingSwitchEnjoy(initValue);
        this.setIsPpmfEnjoy(initValue);
        this.setIsDicPenCloudTypeEnjoy(initValue);
        this.setIsPhoneBookEnjoy(initValue);
        this.setIsAlockEnjoy(initValue);
        this.setIsClassForbiddenEnjoy(initValue);
        this.setIsSosEnjoy(initValue);
        this.setIsRestartEnjoy(initValue);
        this.setIsClockEnjoy(initValue);
        this.setIsCallRecordEnjoy(initValue);
        this.setIsWallpaperEnjoy(initValue);
        this.setIsRejectStrangeCall(initValue);
        this.setIsPowerSaving(initValue);
        this.setIsSleepDetection(initValue);
    }


    /**
     * @description 赋值VIP独享功能
     * @author cwj
     * @param [veaf, vipEnjoyAloneStr]
     * @return void
     * @date @time 2025/1/10 11:55
     **/
    public void settingVipEnjoyAloneFunction(VipEnjoyAloneFunction veaf, String vipEnjoyAloneStr) {
        //初始化默认值
        veaf.init(0);
        if(StringUtils.isNotEmpty(vipEnjoyAloneStr)){
            if(vipEnjoyAloneStr.contains("LE0")){
                veaf.setIsLocationEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("VE0")){
                veaf.setIsVideoEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("PE0")){
                veaf.setIsPhotoEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("SE0")){
                veaf.setIsStepEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("CE0")){
                veaf.setIsChatEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("WF0")){
                veaf.setIsWifiEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("DW0")){
                veaf.setIsDrinkWaterEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("SN0")){
                veaf.setIsSedentarinessEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("AM0")){
                veaf.setIsAppManagerEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("AS0")){
                veaf.setIsAgenetSmsEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("AC0")){
                veaf.setIsAutoCallEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("SS0")){
                veaf.setIsScreensavorEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("FI0")){
                veaf.setIsFindEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("DS0")){
                veaf.setIsDialSwitchEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("FL0")){
                veaf.setIsFlowerEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("CF0")){
                veaf.setIsCostFlowEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("ST0")){
                veaf.setIsSchoolTimeTableEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("VC0")){
                veaf.setIsVoucherCenterEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("HR0")){
                veaf.setIsHeartRateEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("TE0")){
                veaf.setIsTemperatureEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("TS0")){
                veaf.setIsTimingSwitchEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("PP0")){
                veaf.setIsPpmfEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("DP0")){
                veaf.setIsDicPenCloudTypeEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("PB0")){
                veaf.setIsPhoneBookEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("AK0")){
                veaf.setIsAlockEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("FB0")){
                veaf.setIsClassForbiddenEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("SO0")){
                veaf.setIsSosEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("RG0")){
                veaf.setIsRestartEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("CH0")){
                veaf.setIsClockEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("CR0")){
                veaf.setIsCallRecordEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("WP0")){
                veaf.setIsWallpaperEnjoy(1);
            }
            if(vipEnjoyAloneStr.contains("RS0")) {
                veaf.setIsRejectStrangeCall(1);
            }
            if(vipEnjoyAloneStr.contains("PS0")) {
                veaf.setIsPowerSaving(1);
            }
            if(vipEnjoyAloneStr.contains("SD0")) {
                veaf.setIsSleepDetection(1);
            }
        }
    }
}
